<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>二维码免费</title>
<script
	src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="/park/bootstrap/css/bootstrap.min.css" >
<link rel="stylesheet" href="/park/bootstrap/css/bootstrap-theme.min.css" >
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/park/bootstrap/js/bootstrap.min.js" ></script>
<script src="/park/js/binding.js?v=1.21"></script>
<script src="/park/js/free.js?v=1.311313"></script>
<script src="/park/js/layer_mobile/layer.js?v=1.212126"></script>
<script type="text/javascript"
	src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>

<link rel="stylesheet" href="/park/css/binding.css">
<style type="text/css">
</style>
</head>
<body>
	<table class="table table-striped" id="dataTable">
		<tbody>
		<tr>
			<input type="hidden" id="streetNo" th:value="${streetNo}">
		</tr>
		<tr>
			<td><input class="form-control input-sm" type="text" id="carLicense" style="font-size: 18px;line-height: 46px;height: 46px;" placeholder="请输入车牌号"></td>
		</tr>
		</tr>
		<tr>
			<td colspan="2">
				<button type="button" style="width: 100%;font-size:18px;line-height: 38px;height: 46px;" onclick="go()"  class="btn btn-success">确定</button>
			</td>
		</tr>
		</tbody>
	</table>
</body>
</html>

<script type="text/javascript">
	function go(){
		var streetNo = $('#streetNo').val();
		var carLicense = $('#carLicense').val();
		$.ajax({
			url:'/park/data/help/free',
			data:'streetNo='+streetNo+'&carLicense='+carLicense,
			type:'post',
			dataType:'json',
			success:function(res){
				if('200'==res.code){
					if(res.data.status==0){
						layer.open({
						    content: '操作成功！'
							,btn: '确定'
							,yes: function(){
						    	location.href = '/park/redirect';
							}
						  });
					}else{
						layer.open({
						    content: res.data.msg
							,btn: '确定'
						  });
					}
				}else{
					layer.open({
					    content: '出错了！'
					    ,skin: 'msg'
					    ,time: 2 //2秒后自动关闭
					  });
				}
			}
		})
	}
</script>
